﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>JavaScript控制CSS</title>
    <script type="text/javascript">
        function cc(){
            var obj=document.getElementById("tc");
            if(obj.style.display=="none"){
                obj.style.display="";
            }else{
                obj.style.display="none";
            }
        }
        function aa(){
            var obj=document.getElementById("ta");
            if(obj.style.display=="none"){
                obj.style.display="";
            }else{
                obj.style.display="none";
            }
        }
    </script>
</head>
<body>
<table border="1">
    <tr>
        <td style="cursor:hand;display:none" onClick="cc()" id="ta">点击一下</td>
    </tr>
    <tr id="tc" style="display:none">
        <td>内容显示</td>
    </tr>
</table>
<font onClick="aa()">JavaScript控制CSS</font>
</body>
</html>